import { connect } from 'dva';
import React from 'react';
import {
  Button,
  Checkbox,
  Col,
  DatePicker,
  Form,
  Input,
  InputNumber,
  Modal,
  Radio,
  Row,
  Select,
  Tabs,
  Upload,
} from 'antd';

const { TabPane } = Tabs;
const FormItem = Form.Item;
const CheckboxGroup = Checkbox.Group;
const RadioGroup = Radio.Group;


const OrderEssentialInfo = Form.create()(
  class CreateForm extends React.Component {
    // eslint-disable-next-line react/sort-comp
    constructor(props: any) {
      super(props);
      this.state = {
        open: false,
      };
    }

    flag = true;

    handleCollectForm = () => this.flag

    checkOrderEssentialInfo = () => {

    }

    handleConfirm = (props: any) => {
    }

    handleCancel = () => {
      // @ts-ignore
      this.props.form.resetFields();
      this.setState({ open: false });
    };

    render() {
      // @ts-ignore
      const { getFieldDecorator } = this.props.form;

      const formItemLayout = { labelCol: { span: 8 }, wrapperCol: { span: 14 } };
      const formItemLayout2 = { labelCol: { span: 4 }, wrapperCol: { span: 18 } };
      const formItemLayout3 = { labelCol: { span: 1 }, wrapperCol: { span: 22 } };


      console.info(getFieldDecorator);

      const footer = [];

      footer.push(
        // eslint-disable-next-line react/jsx-no-bind
        <Button key="cancel" size="large" onClick={this.handleCancel.bind(this)}>
          取消
        </Button>,
      );

      footer.push(
        // @ts-ignore
        // eslint-disable-next-line react/jsx-no-bind
        <Button key="submit" size="large" loading={this.props.loading} onClick={this.handleConfirm.bind(this)}>
          确认
        </Button>,
      );


      const berCompany =
            <Row>
                <Col span={12}>
                    <FormItem {...formItemLayout} label="船公司" hasFeedback>
                        {getFieldDecorator('berthingId', {
                            initialValue: '',
                        })(
                            <Select style={{ width: '100%' }} placeholder="可通过输入关键字搜索">

                            </Select>,
                            )}
                    </FormItem>
                </Col>
                <Col span={12}>
                    <FormItem {...formItemLayout} label="船名" hasFeedback>
                        {getFieldDecorator('vesselName', {
                            rules: [{
                                required: false, message: '请输入船名！',
                            }],
                            initialValue: '',
                        })(
                            <Input maxLength={100} />,
                            )}
                    </FormItem>
                </Col>
            </Row>

        const airCompany =
            <Row>
                <Col span={12}>
                    <FormItem {...formItemLayout} label="航空公司" hasFeedback>
                        {getFieldDecorator('aviationId', {
                            initialValue: '',
                        })(
                            <Select style={{ width: '100%' }} disabled showSearch placeholder="可通过输入关键字搜索" >
                            </Select>,
                            )}
                    </FormItem>
                </Col>
                <Col span={12}>
                    <FormItem {...formItemLayout} label="航班信息" hasFeedback>
                        {getFieldDecorator('voyageNumber', {
                            rules: [{
                                required: false, message: '请输入航班信息！',
                            }],
                            initialValue: '',
                        })(
                            <Input maxLength={100} />,
                            )}
                    </FormItem>
                </Col>
            </Row>


      return (
        <Modal
          destroyOnClose
          title="物流工作单"
          visible
          width={900}
          footer={footer}
          onCancel={this.handleCancel}
        >
            <Form>
              <Tabs tabPosition="top">
                <TabPane tab="主界面" key="1">
                <Tabs tabPosition="top">
                    <TabPane tab="基本信息" key="1">
                        <Row>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="客户名称" hasFeedback>
                                    {getFieldDecorator('companyName', {
                                        initialValue: '',
                                    })(
                                        <Input maxLength={200} />,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="合约号" hasFeedback>
                                    {getFieldDecorator('contractNo', {
                                        initialValue: '',
                                    })(
                                        <Input maxLength={50} />,
                                        )}
                                </FormItem>
                            </Col>
                        </Row>
                      {airCompany}
                      {berCompany}
                        <Row>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="起运港" hasFeedback>
                                    {getFieldDecorator('loadingPort', {
                                        initialValue: '',
                                    })(
                                        <Select style={{ width: '100%' }} />,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="目的港" hasFeedback>
                                    {getFieldDecorator('destinationPort', {
                                        initialValue: '',
                                    })(
                                        <Select disabled style={{ width: '100%' }} />,
                                        )}
                                </FormItem>
                            </Col>
                        </Row>
                        <Row>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="中转港" hasFeedback>
                                    {getFieldDecorator('transitPort', {
                                        rules: [{
                                            required: false, message: '请选择中转港',
                                        }],
                                        initialValue: '',
                                    })(
                                        <Select style={{ width: '100%' }} />,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="结算方式" hasFeedback>
                                    {getFieldDecorator('statementType', {
                                        initialValue: '',
                                    })(
                                        <Select disabled>
                                            <Select.Option value={0}>票结</Select.Option>
                                            <Select.Option value={1}>月结</Select.Option>
                                        </Select>,
                                        )}
                                </FormItem>
                            </Col>
                        </Row>
                        <Row>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="SO号" hasFeedback>
                                    {getFieldDecorator('soNo', {
                                        rules: [{
                                            required: false, message: '请输入SO号',
                                        }],
                                        initialValue: '',
                                    })(
                                        <Input maxLength={50} />,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label={<span>上传SO</span>} hasFeedback>
                                    <Upload.Dragger />
                                </FormItem>
                            </Col>
                        </Row>
                    </TabPane>
                </Tabs>

                <Tabs tabPosition="top">
                    <TabPane tab="供应商信息" key="1">
                        <Row>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="海运供应商" hasFeedback>
                                    {getFieldDecorator('shippingSupplier', {
                                        initialValue: '',
                                    })(
                                        <Input disabled />,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="拖车供应商" hasFeedback>
                                    {getFieldDecorator('trailerSupplierId', {
                                        rules: [{
                                            required: false, message: '请选择供应商代码',
                                        }],
                                        initialValue: '',
                                    })(
                                        <Select style={{ width: '100%' }}
                                            showSearch placeholder="可通过输入关键字搜索">
                                        </Select>,
                                        )}
                                </FormItem>
                            </Col>
                        </Row>
                        <Row>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="报关供应商" hasFeedback>
                                    {getFieldDecorator('declareSupplierId', {
                                        rules: [{
                                            required: false, message: '请选择供应商代码',
                                        }],
                                        initialValue: '',
                                    })(
                                        <Select style={{ width: '100%' }}
                                            showSearch placeholder="可通过输入关键字搜索">
                                            {
                                            }
                                        </Select>,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="空运供应商" hasFeedback>
                                    {getFieldDecorator('airSupplier', {
                                        initialValue: '',
                                    })(
                                        <Input disabled />,
                                        )}
                                </FormItem>
                            </Col>
                        </Row>
                        <Row>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="快递供应商" hasFeedback>
                                    {getFieldDecorator('expressSupplier', {
                                        initialValue: '',
                                    })(
                                        <Input disabled />,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="保险供应商" hasFeedback>
                                    {getFieldDecorator('insuranceSupplierId', {
                                        rules: [{
                                            required: false, message: '请选择供应商代码',
                                        }],
                                        initialValue: '',
                                    })(
                                        <Select style={{ width: '100%' }}
                                                showSearch placeholder="可通过输入关键字搜索">
                                        </Select>,
                                        )}
                                </FormItem>
                            </Col>
                        </Row>
                        <Row>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="商检供应商" hasFeedback>
                                    {getFieldDecorator('inspectionSupplierId', {
                                        rules: [{
                                            required: false, message: '请选择供应商代码',
                                        }],
                                        initialValue: '',
                                    })(
                                        <Select style={{ width: '100%' }}
                                                showSearch placeholder="可通过输入关键字搜索">
                                        </Select>,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="产地证供应商" hasFeedback>
                                    {getFieldDecorator('coSupplierId', {
                                        rules: [{
                                            required: false, message: '请选择供应商代码',
                                        }],
                                        initialValue: '',
                                    })(
                                        <Select style={{ width: '100%' }}
                                                showSearch placeholder="可通过输入关键字搜索">
                                        </Select>,
                                        )}
                                </FormItem>
                            </Col>
                        </Row>
                        <Row>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="仓内装供应商" hasFeedback>
                                    {getFieldDecorator('storageSupplierId', {
                                        rules: [{
                                            required: false, message: '请选择供应商代码',
                                        }],
                                        initialValue: '',
                                    })(
                                        <Select style={{ width: '100%' }}
                                                showSearch placeholder="可通过输入关键字搜索">
                                        </Select>,
                                        )}
                                </FormItem>
                            </Col>
                        </Row>
                    </TabPane>
                </Tabs>

                <Tabs tabPosition="top">
                    <TabPane tab="服务信息" key="1">
                        <Row>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="提单方式">
                                    {getFieldDecorator('billType', {
                                        rules: [{
                                            required: true, message: '请选择提单方式',
                                        }],
                                        initialValue: '',
                                    })(
                                        <RadioGroup >
                                            <Radio value="1">MBL</Radio>
                                            <Radio value="2">HBL</Radio>
                                        </RadioGroup>,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="出单方式">
                                    {getFieldDecorator('issueType', {
                                        rules: [{
                                            required: true, message: '请选择出单方式',
                                        }],
                                        initialValue: '',
                                    })(
                                        <Select style={{ width: '100%' }} allowClear>
                                            <Select.Option value="1">正本</Select.Option>
                                            <Select.Option value="2">电放</Select.Option>
                                            <Select.Option value="3">SWB</Select.Option>
                                        </Select>,
                                        )}
                                </FormItem>
                            </Col>
                        </Row>
                        <Row>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="MBL NO." hasFeedback>
                                    {getFieldDecorator('mblNo', {
                                        rules: [{
                                            required: true, message: '请输入MBL NO.',
                                        }],
                                        initialValue: '',
                                    })(
                                        <Input maxLength={18} />,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="HBL NO." hasFeedback>
                                    {getFieldDecorator('hblNo', {
                                        initialValue: '',
                                    })(
                                        <Input maxLength={18} />,
                                        )}
                                </FormItem>
                            </Col>
                        </Row>
                        <Row>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="签发日期" hasFeedback>
                                    {getFieldDecorator('issueDate', {
                                        rules: [{
                                            required: true, message: '请选择签发日期',
                                        }],
                                        initialValue: '',
                                    })(
                                        <DatePicker
                                            showTime={{ format: 'YYYY-MM-DD' }}
                                            format="YYYY-MM-DD" placeholder="请选择有效开始时间" />,
                                        )}
                                </FormItem>
                            </Col>
                        </Row>
                        <Row>
                            <Col span={24}>
                                <FormItem {...formItemLayout2} label="服务类型">
                                    {getFieldDecorator('service', {
                                        initialValue: '',
                                    })(
                                        <CheckboxGroup style={{ width: 800 }} disabled>
                                            <Checkbox value="1">整柜</Checkbox>
                                            <Checkbox value="2">拖车</Checkbox>
                                            <Checkbox value="3">报关</Checkbox>
                                            <Checkbox value="4">保险</Checkbox>
                                            <Checkbox value="5">商检</Checkbox>
                                        </CheckboxGroup>,
                                        )}
                                </FormItem>
                            </Col>
                        </Row>
                        <Row>
                            <Col span={2} style={{ marginLeft: 88 }}>
                                <span>柜型/柜量 :</span>
                            </Col>
                            <Col span={4}>
                                <FormItem {...formItemLayout3}>
                                    {getFieldDecorator('size20gp', {
                                        initialValue: '',
                                    })(
                                        <InputNumber min={0} maxLength={4} style={{ width: '100%' }} placeholder="数量" />,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={2}>
                                <span>*20GP</span>
                            </Col>
                            <Col span={4}>
                                <FormItem {...formItemLayout3}>
                                    {getFieldDecorator('weight20gp', {
                                        initialValue: '',
                                    })(
                                        <InputNumber min={0} maxLength={18} style={{ width: '100%' }} placeholder="重量" />,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={2}>
                                <span>KGS</span>
                            </Col>
                        </Row>
                        <Row>
                            <Col span={3} style={{ marginLeft: 50 }}>
                            </Col>
                            <Col span={4}>
                                <FormItem {...formItemLayout3}>
                                    {getFieldDecorator('size40gp', {
                                        initialValue: '',
                                    })(
                                        <InputNumber disabled min={0} maxLength={4} style={{ width: '100%' }} placeholder="数量" />,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={2}>
                                <span>*40GP</span>
                            </Col>
                            <Col span={4}>
                                <FormItem {...formItemLayout3}>
                                    {getFieldDecorator('weight40gp', {
                                        initialValue: '',
                                    })(
                                        <InputNumber disabled min={0} maxLength={18} style={{ width: '100%' }} placeholder="重量" />,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={2}>
                                <span>KGS</span>
                            </Col>
                        </Row>
                        <Row>
                            <Col span={3} style={{ marginLeft: 50 }}>
                            </Col>
                            <Col span={4}>
                                <FormItem {...formItemLayout3}>
                                    {getFieldDecorator('size40hq', {
                                        initialValue: '',
                                    })(
                                        <InputNumber disabled min={0} maxLength={4} style={{ width: '100%' }} placeholder="数量" />,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={2}>
                                <span>*40HQ</span>
                            </Col>
                            <Col span={4}>
                                <FormItem {...formItemLayout3}>
                                    {getFieldDecorator('weight40hq', {
                                        initialValue: '',
                                    })(
                                        <InputNumber disabled min={0} maxLength={18} style={{ width: '100%' }} placeholder="重量" />,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={2}>
                                <span>KGS</span>
                            </Col>
                        </Row>
                        <Row>
                            <Col span={2} style={{ marginLeft: 88 }}>
                                <span>重量/体积 :</span>
                            </Col>
                            <Col span={4}>
                                <FormItem {...formItemLayout3}>
                                    {getFieldDecorator('totalNum', {
                                        initialValue: '',
                                    })(
                                        <InputNumber min={0} maxLength={4} style={{ width: '100%' }} />,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={2}>
                                <span>PKG</span>
                            </Col>
                            <Col span={4}>
                                <FormItem {...formItemLayout3}>
                                    {getFieldDecorator('volume', {
                                        initialValue: '',
                                    })(
                                        <InputNumber min={0} maxLength={18} style={{ width: '100%' }} placeholder="体积" />,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={2}>
                                <span>CBM</span>
                            </Col>
                            <Col span={4}>
                                <FormItem {...formItemLayout3}>
                                    {getFieldDecorator('volumeWeight', {
                                        initialValue: '',
                                    })(
                                        <InputNumber min={0} maxLength={18} style={{ width: '100%' }} placeholder="重量" />,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={2}>
                                <span>KGS</span>
                            </Col>
                        </Row>
                        <Row>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="柜号" hasFeedback>
                                    {getFieldDecorator('cntrNo', {
                                        rules: [{
                                            required: false, message: '请输入柜号',
                                        }],
                                        initialValue: '',
                                    })(
                                        <Input maxLength={18} />,
                                        )}
                                </FormItem>
                            </Col>
                            <Col span={12}>
                                <FormItem {...formItemLayout} label="封号" hasFeedback>
                                    {getFieldDecorator('sealNumber', {
                                        rules: [{
                                            required: false, message: '请输入封号',
                                        }],
                                        initialValue: '',
                                    })(
                                        <Input />,
                                        )}
                                </FormItem>
                            </Col>
                        </Row>
                    </TabPane>
                </Tabs>
                </TabPane>
                <TabPane tab="时间" key="2">
                  <Tabs tabPosition="top">
                    <TabPane tab="时间节点" key="1">
                      <Row>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="开仓时间" hasFeedback>
                            {getFieldDecorator('openDate', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="截仓时间" hasFeedback>
                            {getFieldDecorator('closeDate', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="截重时间" hasFeedback>
                            {getFieldDecorator('truncationDate', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="配船时间" hasFeedback>
                            {getFieldDecorator('distributionShipsDate', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="截关时间" hasFeedback>
                            {getFieldDecorator('cyCloseTime', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="截VGM时间" hasFeedback>
                            {getFieldDecorator('vgmTime', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="截补料时间" hasFeedback>
                            {getFieldDecorator('siCutTime', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="截EMS时间" hasFeedback>
                            {getFieldDecorator('emsTime', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="截AMS时间" hasFeedback>
                            {getFieldDecorator('isfTime', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="截ISF时间" hasFeedback>
                            {getFieldDecorator('isfTime', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="开船时间" hasFeedback>
                            {getFieldDecorator('etdDate', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="起飞时间" hasFeedback>
                            {getFieldDecorator('takeOffDate', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="中转时间" hasFeedback>
                            {getFieldDecorator('tsDate', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="预计到港时间" hasFeedback>
                            {getFieldDecorator('etaDate', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                      </Row>
                    </TabPane>
                  </Tabs>

                  <Tabs tabPosition="top">
                    <TabPane tab="关键节点完成时间" key="1">
                      <Row>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="拖车时间" hasFeedback>
                            {getFieldDecorator('trailerDate', {
                              initialValue: '',
                            })(
                              <DatePicker disabled
                                          style={{ width: '100%' }}
                                          showTime={{ format: 'YYYY-MM-DD' }}
                                          format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="报关时间" hasFeedback>
                            {getFieldDecorator('declareDate', {
                              initialValue: '',
                            })(
                              <DatePicker disabled
                                          style={{ width: '100%' }}
                                          showTime={{ format: 'YYYY-MM-DD' }}
                                          format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="放行时间" hasFeedback>
                            {getFieldDecorator('passTime', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="补料时间" hasFeedback>
                            {getFieldDecorator('siTime', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="实际开船时间" hasFeedback>
                            {getFieldDecorator('realityEtdDate', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="实际起飞时间" hasFeedback>
                            {getFieldDecorator('realityTakeOffDate', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                      </Row>
                      <Row>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="实际中转时间" hasFeedback>
                            {getFieldDecorator('realityTsDate', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="实际到港时间" hasFeedback>
                            {getFieldDecorator('realityEtaDate', {
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD" />,
                            )}
                          </FormItem>
                        </Col>
                        <Col span={12}>
                          <FormItem {...formItemLayout} label="操作时间" hasFeedback>
                            {getFieldDecorator('chargeTime', {
                              // rules: [{
                              //     required: true, message: '请选择操作时间'
                              // }],
                              initialValue: '',
                            })(
                              <DatePicker
                                style={{ width: '100%' }}
                                showTime={{ format: 'YYYY-MM-DD' }}
                                format="YYYY-MM-DD"/>,
                            )}
                          </FormItem>
                        </Col>
                      </Row>
                    </TabPane>
                  </Tabs>
                </TabPane>
                <TabPane tab="补料" key="3">
                </TabPane>
              </Tabs>
            </Form >
        </Modal>
        )
    }
})

function mapStateToProps(state : any) {
    return {
      // eslint-disable-next-line max-len
        loading: state.loading.models.order, order: state.order, supplier: state.supplier, berthingCompany: state.berthingCompany, airCompany: state.airCompany,
    };
}

export default connect(mapStateToProps)(OrderEssentialInfo);
